<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>添加管理员</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	<link href="../../css/demo.css" rel="stylesheet" type="text/css" />
	<script src="../../js/boot.js" type="text/javascript"></script>
	<link href="../../js/miniui/themes/default/large-mode.css" rel="stylesheet" type="text/css" />
	<link href="../../js/miniui/themes/bootstrap/skin.css" rel="stylesheet" type="text/css" />
	<script src="../../js/tuser/tuser.js" type="text/javascript"></script>
    <style type="text/css">
    html, body
    {
        font-size:12px;
        padding:0;
        margin:0;
        border:0;
        height:100%;
        overflow:hidden;
    }
    </style>
</head>
<body>    
     <!-- 数据获取到以name的方式进行装载装载到相应的位置进行显示 -->
    <form id="form1" method="post"  enctype="multipart/form-data"> 
    	<input name="tuId" class="mini-hidden" id="tuId"/>
        <div style="padding-left:11px;padding-bottom:5px;" >
            <table style="table-layout:fixed;margin-top:20px;align:center">
                 <tr style="padding:10px">
                    <td>登录名称</td>
                    <td style="padding:10px">    
                        <input name="loginName" required="true"  style="width:180px"  class="mini-textbox" id="loginName"/>
                    </td>
                    <td>真实姓名</td>
                    <td style="padding:10px">    
                       <input name="vsername" required="true"   style="width:180px; vtype="float" class="mini-textbox" id="vsername"/>
                    </td>
                    <td>电话号码</td>
                    <td style="padding:10px">    
                       <input name="mobile" required="true"   style="width:180px; vtype="float" class="mini-textbox" id="mobile"/>
                    </td>
                </tr>
                <tr style="padding:10px">
                	 <td>邮箱地址</td>
                    <td style="padding:10px">    
                       <input name="email" required="true"   style="width:180px; vtype="float" class="mini-textbox" id="email"/>
                    </td>
                    <td>创建时间</td>
                  	<td style="padding:10px">    
                       <input name="createTime" readonly="true"  style="width:180px;" class="mini-datepicker" format="yyyy-MM-dd H:mm:ss" timeFormat="H:mm:ss" showTime="true" id="createTime"/>
                    </td>
                    <td>操作人</td>
                    <td style="padding:10px">    
                       <input name="createUser" readonly="true"   style="width:180px; vtype="float" class="mini-textbox" id="createUser"/>
                    </td>
                   
                </tr>
                 <tr style="padding:10px">
                     <td>更新时间</td>
                   <td style="padding:10px">    
                       <input name="updateTime" readonly="true"  style="width:180px;" class="mini-datepicker" format="yyyy-MM-dd H:mm:ss" timeFormat="H:mm:ss" showTime="true" id="updateTime"/>
                    </td>
                    <td>更新人</td>
                    <td style="padding:10px">    
                       <input name="updateUser" readonly="true"   style="width:180px;"  class="mini-textbox" id="updateUser"/>
                    </td>
                     <td>上次登录时间</td>
                   <td style="padding:10px">    
                       <input name="lastLoginTime" readonly="true"   style="width:180px;" class="mini-datepicker" format="yyyy-MM-dd H:mm:ss" timeFormat="H:mm:ss" showTime="true" id="lastLoginTime"/>
                    </td>
                </tr>
                <tr>
                	<td>角色状态</td>
                    <td style="padding:10px">    
                        <select name="disabledState" class="mini-radiobuttonlist" id="disabledState">
                        	<option value="0">可用</option>
                        	<option value="1">禁用</option>
                    	</select>
                    </td>
                </tr>
            </table>
        </div>
          
        <fieldset style="border:solid 1.2px #aaa;padding:3px;">
            <legend >权限信息</legend>
            	 <div id="rightlist" class="mini-checkboxlist" style="height:230px" repeatItems="8" repeatLayout="table" textField="rightName" valueField="trId" value=""  url="javascript:getRootPath()+'/rest/right/parent_list'" >
			    </div>
        </fieldset>  
        <div style="text-align:center;padding:20px;">               
            <a class="mini-button mini-button-primary" onclick="onOk" style="width:160px;margin-right:30px;">新增(更新)管理员信息</a>       
            <a class="mini-button mini-button-primary" onclick="onCancel" style="width:160px;">取     消</a>  
        </div>      
    </form>
    <script type="text/javascript">
        mini.parse();
       	form = new mini.Form("#form1");
       	
       	function setUserId(tuId){
       	
       	 var params={"userId":tuId};
   	  	params = JSON.stringify(params)
       	 $.ajax({
 			type : 'post',
 			url : getRootPath()+'/rest/right/rightByUserID',
 			data : params, // 传给action的参数
 			async:false,
 			success : function(data) {
 				//var suc_data = eval('('+ data +')');
 				if(data.length > 0){
 					var obj = mini.get("rightlist");
 					var str_id = "";
 					for(var i = 0;i<data.length;i++){
 						str_id+=data[i].id+",";
 					}
 					obj.setValue(str_id);
 				}
 			},
 			error: function(XMLHttpRequest, textStatus, errorThrown) {
 				 alert(XMLHttpRequest.status);
 				 alert(XMLHttpRequest.responseText);
// 				 alert(textStatus);
 			}
 		});
       		
       	}
    </script>
</body>
</html>
